import { createRouter, createWebHashHistory } from 'vue-router';
import Preopen from '../views/Preopen.vue';
import Login from '../views/Login.vue';
import Home from '../views/Home.vue';

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/preopen',
      component: Preopen
    },
    {
      path: '/login',
      component: Login
    },
    {
      path: '/home',
      component: Home
    },
    // -------------------
    {
      path: '/',
      redirect: '/preopen'
    }
    // {
    //   path: '/about',
    //   // route level code-splitting
    //   // this generates a separate chunk (About.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import('../views/AboutView.vue')
    // }
  ]
});

export default router;
